package com.siemens.industrial.web.mvc.pojo;

import org.springframework.jdbc.core.RowMapper;

import java.util.Date;

/**
 * Created by qupen on 2016/9/19.
 */
public class TenantServiceItem {
    private  String tenantId;
    private  String tenantName;
    private  String serviceId;
    private  String serviceName;
    private  String enabled;
    private String startTime;
    private String endTime;
    private  int count;//注册机床数
    private String valid;//服务期限
    private String address;

    private static final RowMapper<TenantServiceItem> rowMapper = (resultSet, i) -> {
        TenantServiceItem tenantServiceItem = new TenantServiceItem();
        tenantServiceItem.setTenantName(resultSet.getString("tenant_name"));
        tenantServiceItem.setCount(resultSet.getInt("count"));
        tenantServiceItem.setTenantId(resultSet.getString("tenant_id"));
        tenantServiceItem.setEnabled(resultSet.getString("enabled"));
        tenantServiceItem.setServiceId(resultSet.getString("serviceIds"));
        tenantServiceItem.setValid(resultSet.getString("valid"));
        tenantServiceItem.setServiceName(resultSet.getString("names"));
        return tenantServiceItem;
    };

    public static RowMapper<TenantServiceItem> getRowMapper() {
        return rowMapper;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getTenantName() {
        return tenantName;
    }

    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getValid() {
        return valid;
    }

    public void setValid(String valid) {
        this.valid = valid;
    }
}
